<template>
  <div class="home">
    这是主页
    <div>
      <Button @click="goLog">写日志</Button>
      <Button @click="back">退出</Button>
    </div>
  </div>
</template>

<script>
// @ is an alias to /src
import { removeToken } from "@/utils/auth";
export default {
  name: "home",
  methods: {
    back() {
      removeToken();
      this.$router.push({ name: "Login" });
    },
    goLog() {
      this.$router.push({ name: "Log" });
    }
  }
};
</script>
